package com.lcq.study.common;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName SubListTest
 * @Description
 * @Author lichuanqi
 * @Date 2023/5/24 11:32
 * @Version 1.0
 **/
public class SubListTest {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("0");
        list.add("1");
        list.add("2");
        list.add("3");
        list.add("4");
        list.add("5");
        list.add("6");
        list.add("7");
        list.add("8");
        list.add("9");
        System.out.println(list);

        List<String> subList = list.subList(5, 8);
        System.out.println(subList);
        subList.clear();

        System.out.println(list);

    }
}
